<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/css.css"/>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/global.css"/>
<link rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/powerFloat.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->_var['js_path']; ?>/jnotify/jNotify.jquery.css" />
</head>
<body>
<?php echo $this->fetch('header.html'); ?>
<div id="wrapper">
  <div id="content">
    <div id="con_le"> <?php echo $this->fetch('user_nav.html'); ?> 
    </div>
    
    <div id="con_box">
      <div class="Current"><?php echo $this->_var['position']; ?></div>
      <div class="con_top"> <?php echo $this->fetch('user_common_detail.html'); ?>
        <div class="clear"></div>
      </div>
      <div id="user_content"> <?php echo $this->fetch('message.html'); ?>
        <div id="message_action"> 
        <?php if (! empty ( $this->_var['trade_post_menu'] )): ?>
        	<?php $_from = $this->_var['trade_post_menu']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
            <a href="<?php echo $this->_var['list']['url']; ?>"><?php echo $this->_var['list']['name']; ?></a>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        <?php endif; ?>
        
     
          </div>
          
        <?php if (count ( $this->_var['trade_list'] ) > 0): ?>
        <table width="100%" cellspacing="0" cellpadding="0" class="tableStatic">
          <thead>
            <tr>
              <td width="40%">标题</td>
              <td width="10%">链接</td>
              <td width="30%">状态</td>
              <td width="10%">添加时间</td>
            </tr>
          </thead>
          <tbody>
          
          <?php $_from = $this->_var['trade_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
          <tr id="tr_collect_<?php echo $this->_var['list']['id']; ?>">
            <td><?php echo $this->_var['list']['name']; ?></td>
            <td align="center"><a href="<?php echo $this->_var['list']['url']; ?>" target="_blank">点击查看</a></td>
            <td><span class="end_time" value="<?php echo $this->_var['list']['limit_time']; ?>"></span></td>
			<td align="center"><?php echo Date::timeformat($this->_var['list']['add_time'],2); ?></td>
          </tr>
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </tbody>
          
          <?php if (! empty ( $this->_var['page'] )): ?>
          <tfoot>
            <tr>
              <td colspan="5" align="center"><?php echo $this->_var['page']; ?></td>
            </tr>
          </tfoot>
          <?php endif; ?>
        </table>
        <?php else: ?>
        <h1 style="color:#CCC;text-align:center;margin-top:60px;">暂无</h1>
        <?php endif; ?>
        <div class="clear"></div>
      </div>
    </div>
    
    <div class="clear"></div>
  </div>
   
</div>
<?php echo $this->fetch('footer.html'); ?>
<?php echo $this->fetch('hidden_div.html'); ?> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery-powerFloat.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.pngfix.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/scrolltopcontrol.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/myfloat.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/lhgdialog/lhgcore.lhgdialog.min.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jnotify/jNotify.jquery.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.validate.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/message.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/common.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/user.js"></script> 
<script>
$(function(){
	
	//发送和接受的当前状态
	$('#message_action a').each(function(){
		if($(this).attr('href') == window.location.pathname){
			  $(this).attr('class','current');
		}
	});
	
	  
})

</script>
<script type="text/javascript">
var serverTime = <?php echo $this->_var['server_time']; ?> * 1000;
$(function(){
    var dateTime = new Date();
    var difference = dateTime.getTime() - serverTime;
	
    setInterval(function(){
      $(".end_time").each(function(){
        var obj = $(this);
        var endTime = new Date(parseInt(obj.attr('value')) * 1000);
        var nowTime = new Date();
        var nMS=endTime.getTime() - nowTime.getTime() + difference;
        var myD=Math.floor(nMS/(1000 * 60 * 60 * 24));
        var myH=Math.floor(nMS/(1000*60*60)) % 24;
        var myM=Math.floor(nMS/(1000*60)) % 60;
		var myS=Math.floor(nMS/(1000)) % 60;
        if(myD>= 0){
			var str = "还剩："+myD+"天"+myH+"小时"+myM+"分"+myS+"秒";
        }else{
			var str = "已结束！";	
		}
		
		$(this).html(str);
      });
    }, 100);
});
</script>
</body>
</html>
